home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / Re FW_CDragCommand--BeginDr < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.3 KB  |  [TEXT/ttxt]

  1. Subject:     Re: FW_CDragCommand--BeginDr
  2. Sent:        3/6/96 3:51 PM
  3. Received:    3/6/96 3:01 PM
  4. From:        Mary Boetcher, Mary_Boetcher@quickmail.apple.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.         Reply to:   RE>FW_CDragCommand--BeginDrag 
  9.  
  10. You're correct, this is a bug that has been fixed. The call to
  11. MarkActionHistory was removed, and the code in
  12. FW_CDragCommand::AbortTransaction was changed to call
  13. undo->AbortCurrentTransaction instead of ClearActionHistory.
  14.  
  15. Mary Boetcher
  16. ODF Person
  17. -----
  18. After implementing my undoable CDropCommand subclass, I can successfully
  19. undo/redo a Drag-Move within my part.  I am only allowed one level of undo,
  20. however.  In looking through the code, FW_CDragCommand::BeginDrag calls
  21. undo->MarkActionHistory(ev), with the comment "// in case operation fails and
  22. we need to roll back transactions."  My reading of the OpenDoc Programmer's
  23. Guide suggests that marking is used for creating temporary subhistories,
  24. while rolling back a multistage transaction is accomplished without marking
  25. by calling AbortCurrentTransaction.  This additional mark would be sufficient
  26. to prevent multiple levels of undo.  Is this a bug in
  27. FW_CDragCommand::BeginDrag, or am I missing something?
  28.  
  29.  
  30.